<html>
<head><title>JesusCrypt</title>

</head>
<body>
<style>
body {
background-color: #b0c4de;
}
</style>
<tt>
JesusCrypt - Hashing tool by MauroEldritch<BR>
@ Eldritch Software - http://Eldritch.com.ar<BR><BR>
<hr>
<BR>

<form style="width: 50%; background-color: #FFFFFF; border-style: ridge;"><fieldset><legend>Results</legend><BR>
Hashed String <BR><input type="text" name="hash" style="width: 75%"
value="
<%=
if params[ :salt] == "salt"
	finalhash = "#{params[ :hash]}#{params[ :addsalt]}";
else
	finalhash = "#params[ :hash]";
end

if params[ :algo] == "MD5"
	Digest::MD5.hexdigest(finalhash);
elsif params[ :algo] == "SHA1"
	Digest::SHA1.hexdigest(finalhash);
elsif params[ :algo] == "SHA2"
	Digest::SHA2.hexdigest(finalhash);
elsif params[ :algo] == "RMD160"
	Digest::RMD160.hexdigest(finalhash);
else
	"Error. Possible variable/POST method manipulation."
end
%>
">
<BR>
Salt <BR><input type="text" name="hash" style="width: 75%"
value="
<%= 
if params[ :addsalt] == "Enter custom salt or choose from presets below..." 
	"<N/A>"
else
	params[ :addsalt]
end
%>
">
<BR><BR>

Using 
<%=
if params[ :salt] == "salt"
	" <b>salted</b> "
else
	" <b>unsalted</b> "
end
%>

<%= "#{params[:algo]}."%>
<BR><BR>
<input type="submit" value="Return">
</fieldset></form>
</tt>
<BR>
<h3> Oh my hash! </h3>
</body>
</html>